Cybersecurity analysis report + fork hardening - #1
Conversation
Findings from a three-part audit (CI/supply chain, code-level surface, testing/fuzzing assurance) of this fork, with prioritized reinforcement recommendations and a remediation roadmap. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
Bucket 1 (fork-only) items from SECURITY_ANALYSIS.md: - Add SECURITY.md directing library vulnerability reports upstream and fork-specific reports to this repository's advisory page - Add CODEOWNERS - Owner-guard the publish job in pypi-publish.yml so a fork can never attempt an OIDC publish or mint attestations - Owner-guard the wheel-builder sdist job (skipping it skips the whole chain), keeping pull_request runs so workflow changes stay testable - Skip linux-downstream third-party code execution on forks, with a matching alls-green allowed-skips entry - Skip benchmark job on forks Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
📝 WalkthroughWalkthroughThe changes add fork ownership and security documentation, restrict selected workflows to the upstream repository, adjust PPC64LE build matrices, allow a skipped downstream job, and ignore two problematic documentation links during link checking. ChangesFork controls
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ubuntu-24.04-ppc64le runners are never allocated to personal forks, so the distros ppc64le leg and the manylinux ppc64le wheel legs sit queued forever, holding the runs open and preventing all-green from reporting. Skip them when not running in the pyca org; partially-skipped matrices still aggregate as success. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
The previous commit used the matrix context in job-level if conditions, which is not available there and made both workflow files fail validation. Remove those conditions and instead comment out the ppc64le matrix legs: ubuntu-24.04-ppc64le runners are never allocated outside the pyca org, so the legs queue forever and keep runs from completing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
The weekly linkcheck run fails on forks whenever an external site blocks CI traffic (eprint.iacr.org returns 403 to cloud IPs) or is slow, producing recurring noise. Keep the schedule upstream-only; pull_request runs still validate docs/conf.py and workflow changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
eprint.iacr.org returns 403 to CI/cloud IP ranges and alexgaynor.net consistently exceeds the 5s linkcheck timeout from GitHub-hosted runners (reproduced across runs despite linkcheck_retries=10), failing the linkcheck job on external factors. Add both to linkcheck_ignore, matching the existing entries for hosts that block non-browser requests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@SECURITY_ANALYSIS.md`:
- Around line 15-18: Update SECURITY_ANALYSIS.md to reflect the implemented
remediation: mark the findings about fork-unguarded publishing, missing
SECURITY.md/CODEOWNERS, and benchmark/downstream jobs running on forks as
remediated, or clearly label the document as a pre-remediation snapshot. Ensure
the report no longer presents these controls as absent in the final security
posture.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3126b766-7434-4d6f-ac88-b354dec9b008
📒 Files selected for processing (9)
.github/CODEOWNERS.github/workflows/benchmark.yml.github/workflows/ci.yml.github/workflows/linkcheck.yml.github/workflows/pypi-publish.yml.github/workflows/wheel-builder.ymlSECURITY.mdSECURITY_ANALYSIS.mddocs/conf.py
| **fork-specific**: the release/publish pipeline is not guarded against running in a fork, | ||
| and the vulnerability-reporting channel points at the upstream project. Beyond that, | ||
| there are meaningful gaps in dependency auditing, code scanning, fuzzing, and a handful of | ||
| code-level hardening items. |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Update the report to reflect this PR’s remediation.
These sections still state that publishing is unguarded, no SECURITY.md/CODEOWNERS exists, and benchmark/downstream jobs run on forks. The final workflows and documentation now implement those controls, so either mark these findings as remediated or label the report as a pre-remediation snapshot; otherwise it documents an incorrect security posture.
Also applies to: 37-78
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@SECURITY_ANALYSIS.md` around lines 15 - 18, Update SECURITY_ANALYSIS.md to
reflect the implemented remediation: mark the findings about fork-unguarded
publishing, missing SECURITY.md/CODEOWNERS, and benchmark/downstream jobs
running on forks as remediated, or clearly label the document as a
pre-remediation snapshot. Ensure the report no longer presents these controls as
absent in the final security posture.
Label the report as a point-in-time snapshot and track per-item remediation status in the roadmap table, reflecting the fixes that landed in #1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
Summary
Two commits from a cybersecurity reinforcement analysis of this fork:
1.
SECURITY_ANALYSIS.md— full findings report from a three-part audit (CI/supply-chain posture, code-level cryptographic surface, testing/fuzzing assurance), with prioritized findings (P1–P4) and a 12-item remediation roadmap. Highlights:wheel-builder.yml→pypi-publish.yml) had no repository-owner guard, so a tag push on the fork would attempt a full wheel build and OIDC PyPI publish.ci-constraints-requirements.txtin the publish job, no cargo-deny/CodeQL/Scorecard, nozeroize, no in-repo fuzzing, missingunsafe_op_in_unsafe_fnlint, un-deprecated CAST5/IDEA/SEED/Blowfish re-exports.2. Fork hardening (Bucket 1, fork-only fixes)
SECURITY.md: directs library vulns upstream, fork-specific issues to this repo's advisory page.github/CODEOWNERSpypi-publish.yml: publish job owner-guarded — a fork can never attempt a publish or mint attestationswheel-builder.yml:sdistentry job owner-guarded (skipping it skips the whole chain); PR runs kept so workflow changes stay testableci.yml:linux-downstream(third-party code execution) skipped on forks, withallowed-skipson the alls-green gatebenchmark.yml: owner-guardedUpstream-relevant items (owner guards, lint tightening, hash-pinning) are candidates for separate small PRs to pyca/cryptography, per the roadmap in the report.
Testing
🤖 Generated with Claude Code
https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
Generated by Claude Code
Summary by CodeRabbit
Documentation
Chores